﻿#ifndef INSTRUCTIONTHERMOSTATTARGETTEMPERATURE
#define INSTRUCTIONTHERMOSTATTARGETTEMPERATURE

#include "ScriptInstruction.h"

class InstructionThermostatTargetTemperature :public ScriptInstruction
{
  Q_OBJECT
private://property
  float temperature = 0;
private:
  static const int byteArraySize=sizeof (temperature);//除去指令类型标识符后的数据大小
public:
  explicit InstructionThermostatTargetTemperature();
  InstructionThermostatTargetTemperature(InstructionThermostatTargetTemperature const& instructionThermostatTargetTemperature);
  InstructionThermostatTargetTemperature& operator=(InstructionThermostatTargetTemperature const & instructionThermostatTargetTemperature);
  virtual ~InstructionThermostatTargetTemperature();
public:
  virtual void run()override;
  virtual QString toString()override;
  virtual QByteArray toByteArray() override;
  static ScriptInstruction* fromByteArray1(char * const src,int size,int * offset);
public://geter and seter
  float getTemperature();
  InstructionThermostatTargetTemperature* setTemperature(float temperature);
};
#endif
